<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:display="http://www.w3.org/1999/xhtml" xmlns:div.display="http://www.w3.org/1999/xhtml"
      xmlns:row.display="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta charset="UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>loanReviewCondition</title>

    <!-- Bootstrap Core CSS -->
    <link th:href="@{/vendor/bootstrap/css/bootstrap.min.css}" href="../static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link th:href="@{/vendor/metisMenu/metisMenu.min.css}" rel="stylesheet">

    <!-- Custom CSS -->
    <link th:href="@{/dist/css/sb-admin-2.css}" rel="stylesheet">

    <!-- Custom Fonts -->
    <link th:href="@{/vendor/font-awesome/css/font-awesome.min.css}" rel="stylesheet" type="text/css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>


<!-- Bootstrap Core JavaScript -->
    <script th:src="@{/vendor/jquery/jquery.min.js}" src="../../static/vendor/jquery/jquery.min.js"></script>
    <script th:src="@{/vendor/bootstrap/js/bootstrap.min.js}"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script th:src="@{/vendor/metisMenu/metisMenu.min.js}"></script>

    <!-- Custom Theme JavaScript -->
    <script th:src="@{/dist/js/sb-admin-2.js}"></script>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript">
        function loanReviewConditionSubmit()
        {
            var userid = $("#userid").val();
            var bpm_no = $("#bpm_no").val();
            var result = $("#result").val();
            var stepcode = "放款复核";

            $.ajax({
                type: "POST",
                url: "/loanReviewConditionSubmit",
                contentType: "application/json",
                data: JSON.stringify({
                    userid: userid.toString(),
                    bpm_no: bpm_no.toString(),
                    result: result.toString(),
                    stepcode:stepcode.toString()
                }),
                success: function (data) {
                    alert("放款复核完成，自动刷新网页");
                    $("#table_workflow").submit();
                }
            })
        }


    </script>




</head>
<body>
<div  id ="applyInfo"  >
    <div class="col-lg-12 col-md-12 col-sm-12">
        <form   name="loanReviewCondition1" id="table_workflow" th:action="@{/loanReviewCondition(userid=${userid},bpm_no=${bpm_no})}"  method="post"  >
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <div class="row">
                            <div class="col-lg-6 col-md-6 col-sm-6">
                                <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">工作流程记录</a>
                                <button type="submit" class="btn btn-primary">刷 新</button>
                            </div>
                            <div class="col-lg-3 col-md-3 col-sm-3">
                                <lable>当前步骤：放款录入复核</lable>
                            </div>
                            <div class="col-lg-3 col-md-3 col-sm-3">
                                <lable>工作流状态：正常</lable>
                            </div>



                        </div>
                    </h4>


                </div>
                <div id="collapseOne" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <div class="row" >
                            <div class="tableinfo">
                                <table  class="table" border="1" >
                                    <tr>
                                        <th>日期</th>
                                        <th>用户</th>
                                        <th>步骤</th>
                                    </tr>
                                    <tr th:each="WorkFlow : ${applyInfo_info.Workflow}">
                                        <td th:text="${WorkFlow.ACTIONDATE}"></td>
                                        <td th:text="${WorkFlow.ACTIONUSER}"></td>
                                        <td th:text="${WorkFlow.STEPCODE}"></td>
                                    </tr>
                                </table>
                            </div>

                        </div>


                    </div>
                </div>
            </div>



        </form>
    </div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12">
    <form   name="loanCondition2" >
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-6">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">放款输入</a>
                            <button type="button" class="btn btn-primary"  onclick="loanReviewConditionSubmit()">提 交</button>
                        </div>
                    </div>
                </h4>


            </div>
            <div id="collapseTwo" class="panel-collapse collapse in">
                <div class="panel-body">
                    <div class="row" >
                        <div class="col-lg-2 col-md-2 col-sm-2">
                            <label>主状态：</label>
                        </div>
                        <div class="col-lg-2 col-md-2 col-sm-2">
                            <input class="form-control"  value="Application In Progress" disabled  >
                        </div>
                    </div>
                    <div class="row" >
                        <div class="col-lg-2 col-md-2 col-sm-2">
                            <label>优先权：</label>
                        </div>
                        <div class="col-lg-2 col-md-2 col-sm-2">
                            <select class="form-control"  id="" required>
                                <option value="1">正常</option>
                                <option value="2">最低</option>
                                <option value="3">最高</option>
                            </select>
                        </div>
                    </div>
                    <div class="row" >
                        <div class="col-lg-2 col-md-2 col-sm-2">
                            <label>选择：</label>
                        </div>
                        <div class="col-lg-2 col-md-2 col-sm-2">
                            <select class="form-control" id="result" required>
                                <option value="1">复核通过</option>
                                <option value="2">退回放款输入</option>
                            </select>
                        </div>
                    </div>

                    <div class="row" >
                        <input th:value="${userid}" id="userid" style="display: none">
                        <input th:value="${bpm_no}" id="bpm_no" style="display: none">
                    </div>


                </div>
            </div>
        </div>



    </form>
</div>
</body>
</html>